package com.mapull.compare;

import lombok.Data;

/**
 * @author mapull
 */
@Data
public class Person implements Comparable<Person>{

    private String name;

    private Integer age;

    @Override
    public int compareTo(Person p) {
        return this.age - p.getAge();
    }
}
